import request from "@/router/axios";

//询价列表
export const getList = (current, size, params) => {
  return request({
    url: "/api/blade-tms/Inquiry/InquirySheet/list",
    method: "get",
    params: {
      ...params,
      current,
      size,
    },
  });
};

//报价单
export const getListManage = (params) => {
  return request({
    url: "/api/blade-tms/Inquiry/InquirySheet/priceList",
    method: "get",
    params: {
      ...params,
    },
  });
};

//承运商修改报价
export const getListCarrier = (params, data) => {
  return request({
    url: "/api/blade-tms/Inquiry/InquirySheet/quotedPrice",
    method: "post",
    headers: {
      "Content-Type": "application/json",
    },
    params: {
      ...params,
    },
    data,
  });
};

//管理员修改报价
export const admingetListCarrier = (params, data) => {
  return request({
    url: "/api/blade-tms/Inquiry/InquirySheet/quotedPriceByAdmin",
    method: "post",
    headers: {
      "Content-Type": "application/json",
    },
    params: {
      ...params,
    },
    data,
  });
};

//历史报价
export const historicalbarrier = (params) => {
  return request({
    url: "/api/blade-tms/Inquiry/InquirySheet/historicalPriceList",
    method: "get",
    params: {
      ...params,
    },
  });
};

//关闭
export const closeList = (params) => {
  return request({
    url: "/api/blade-tms/Inquiry/InquirySheet/invalid",
    method: "post",
    headers: {
      "Content-Type": "application/json",
    },
    params: {
      ...params,
    },
  });
};

//确认中标
export const makesure = (params) => {
  return request({
    url: "/api/blade-tms/Inquiry/InquirySheet/winningTheBid",
    method: "post",
    headers: {
      "Content-Type": "application/json",
    },
    params: {
      ...params,
    },
  });
};

// 未中标
export const didNotWinTheBid = (params) => {
  return request({
    url: "/api/blade-tms/Inquiry/InquirySheet/didNotWinTheBid",
    method: "post",
    params,
  });
};
